package com.gokzzz.mq.index;

import lombok.Data;

/**
 * 用于服务之间消息通讯模板
 *
 * @author gokzzz
 * @date 2022-05-22 20:56
 */

@Data
public class ArticleMqIndexMessage {
    public static final String CREATE = "create";
    public static final String UPDATE = "update";
    public static final String REMOVE = "remove";
    public static final int MAX_RETRY = 3;
    private Long articleId;
    private String type;
    private int retry = 0;

    public ArticleMqIndexMessage() {
    }

    public ArticleMqIndexMessage(Long articleId, String type) {
        this.articleId = articleId;
        this.type = type;
    }

    public ArticleMqIndexMessage(Long articleId, String type, int retry) {
        this.articleId = articleId;
        this.type = type;
        this.retry = retry;
    }

}
